package com.xiangxiangjd.kj.papersstar.bean;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author 肖守凯
 * @since 2021-01-26
 */

@Data
@TableName("questionnaire_user")
@ApiModel(value="QuestionnaireUser对象", description="")
public class QuestionnaireUser extends Model<QuestionnaireUser> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id",type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "问卷id")
    @TableField("questionnaire_id")
    private String questionnaireId;

    @JsonProperty(value = "uUserId")
    @ApiModelProperty(value = "用户id")
    @TableField("u_user_id")
    private String uUserId;

    @ApiModelProperty(value = "总分")
    @TableField("total_score")
    private String totalScore;

    //自动新增时间
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private String createTime;
    //自动更新时间

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private String updateTime;


    @ApiModelProperty(value = "0正常  1停用")
    @TableField("del_flag")
    private String delFlag;




    //用户 回答的所有问题
    @TableField(exist = false)
    private List<UserAnswer> userAnswers;


    //获取所有回答的用户
    @TableField(exist = false)
    private User user;

}
